<html xmlns="http://www.w3.org/1999/xhtml">
	<head>
		<title>Create paste</title>
		<link href="/style/hs-paste.css" rel="stylesheet" type="text/css" />
	</head>
	<body onload="document.getElementById('paste-text').focus();">
		<form action="/save" method="post">

			<div id="language-selection">

				<div class="language-radio"
					onclick="document.getElementById('text').click()">

					<input
						type="radio"
						name="language"
						id="text"
						value="text"
						checked="checked"
						onchange="document.getElementById('paste-text').focus();"
					/>

					<label for="text">Plain text</label>

				</div>
			
				<?py for l in base_languages: ?>

					<div class="language-radio"
						onclick="document.getElementById('#{l["id"]}').click()">

						<input
							type="radio"
							name="language"
							id="#{l['id']}"
							value="#{l['id']}"
							onchange="document.getElementById('paste-text').focus();"
						/>

						<label for="#{l['id']}">#{l['name']}</label>

					</div>

				<?py #endfor ?>

				<div class="language-radio"
					onclick="document.getElementById('other').click()">

					<input type="radio" name="language" id="other" value="other" />
					<label for="other">Other:</label>

				</div>

				<select
					name="other"
					onchange="document.getElementById('other').checked = true;">

				<?py for l in all_languages: ?>
					<option 
						value="#{l['id']}"
					>#{l['name']}</option>
				<?py #endfor ?>

				</select>

				<div class="clearing"/>

			</div>

			<div><textarea id="paste-text" name="code" rows="32" cols="80"></textarea></div>
			<div><input type="submit" value="Submit"></div>

		</form>
		<div class='menu'>
			<ul>
				<li><a class='recent' href='/recent'>Recent</a></li>
			</ul>
		</div>
	</body>
</html>
